<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>
  <h1>注册页面</h1>
  <input type="text" class="username" name="username"> <br>
  <input type="text" class="pwd" name="pwd"> <br>
  <input type="button" class="btn" value="提交">

  <script src="./js/ajax.js"></script>
  <script>
    const username = document.querySelector('.username');
    const pwd = document.querySelector('.pwd');
    const btn = document.querySelector('.btn');
    btn.onclick = function () {
      console.log(1)
    }
  </script>
</body>

</html>